package com.ghpt.service.impl;
import com.ghpt.mapper.DianCNMapper;
import com.ghpt.pojo.DianCN;
import com.ghpt.service.DianCNService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DianCNServiceImpl implements DianCNService {
    @Autowired
    private DianCNMapper dianCNMapper;

    @Override
    public DianCN findDianCNById(Long id) {
        if (id != null) {
            return dianCNMapper.selectById(id);
        }else {
            return null;
        }
    }
    @Override
    public int updateById(DianCN dianCN) {
        return dianCNMapper.updateById(dianCN);//更新成功为1否则为0
    }
}
